# -*- coding: utf-8 -*-
"""
****************************
@Time    : 2021/4/30 10:06
@Author  : Candy
@File    : request_err.py
****************************
"""
from flask_restful import abort


class MyAbort:
    def __init__(self):
        pass

    @staticmethod
    def a_404():
        return abort(404, code=404, message_en='page not found', message_ch='未找到相应页面', data={})

    @staticmethod
    def a_403():
        return abort(403, code=403, message_en='access denied', message_ch='拒绝访问', data={})

    @staticmethod
    def a_405():
        return abort(405, code=405, message_en='too frequent visits', message_ch='访问过于频繁', data={})

    @staticmethod
    def a_406():
        return abort(406, code=406, message_en='access denied', message_ch='拒绝访问', data={})
